#ifndef WINWIDGET_H
#define WINWIDGET_H

#include <QGLWidget>
#include <QAbstractTableModel>
#include <QImage>
#include <QLabel>
#include <QTextEdit>
#include <QPushButton>

#include "snakegame.h"

class Control;

class IconWidget : public QGLWidget{
private:
    QImage icon;

public:
    IconWidget(QImage ic, QWidget* par=0);
    void setIconImage(QImage ic);
    void paintGL();
};

class WinWidget : public QWidget
{
    Q_OBJECT
public:
    explicit WinWidget(QWidget *parent = 0);

signals:

public slots:

};

class AboutWindow : public WinWidget{
    Q_OBJECT

private:
    Control* control;

public:
    AboutWindow(Control* c, QWidget* par=0);

public slots:
    void ok();
};

class SaveWindow : public WinWidget{
    Q_OBJECT

private:
    Control* control;
    int level;
    int scores;
    QString date;
    QTextEdit* player1;
    QTextEdit* player2;
    QTextEdit* player3;
    QTextEdit* player4;
    QTextEdit* player5;
    QTextEdit* level1;
    QTextEdit* level2;
    QTextEdit* level3;
    QTextEdit* level4;
    QTextEdit* level5;
    QTextEdit* scores1;
    QTextEdit* scores2;
    QTextEdit* scores3;
    QTextEdit* scores4;
    QTextEdit* scores5;
    QTextEdit* date1;
    QTextEdit* date2;
    QTextEdit* date3;
    QTextEdit* date4;
    QTextEdit* date5;
    QVector<Game*> games;
    QPushButton* okButton;

public:
    SaveWindow(Control* c, QWidget* par=0);
    void setup(int l, int s, QString d);
    void setGames(QVector<Game*> g);

public slots:
    void ok();
};

#endif // WINWIDGET_H
